<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <h1>我的第N个JavaScript 程序</h1>
    <p id="demo">这是一个段落</p>
    
    <button type="button" onclick="displayDate()">显示日期</button>
    
    <script>
        function displayDate() {
                document.getElementById("demo").innerHTML = Date();
            }
    </script>
</body>
</html>